{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/containers/Messages.tsx\",\n  _s = $RefreshSig$();\nimport React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { Context } from \"../index\";\nimport { Messages as MessagesList } from \"../components/\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst Messages = () => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const messagesRef = React.useRef(null);\n  React.useEffect(() => {\n    if (messagesRef !== null) {\n      messagesRef.current.scrollTo(0, 999999);\n    }\n  });\n  if (store.getCurrentDialog().messages && store.getViewedDialogId() !== null) {\n    return /*#__PURE__*/_jsxDEV(MessagesList, {\n      messages: store.getCurrentDialog().messages\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 17,\n      columnNumber: 17\n    }, this);\n  } else {\n    return /*#__PURE__*/_jsxDEV(MessagesList, {}, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 19,\n      columnNumber: 17\n    }, this);\n  }\n};\n_s(Messages, \"vG3+x6NjKGhotmqlphTTGDDUha0=\");\n_c = Messages;\nexport default _c2 = observer(Messages);\nvar _c, _c2;\n$RefreshReg$(_c, \"Messages\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","observer","Context","Messages","MessagesList","store","useContext","messagesRef","useRef","useEffect","current","scrollTo","getCurrentDialog","messages","getViewedDialogId"],"sources":["/data/messenger.client/src/containers/Messages.tsx"],"sourcesContent":["import React from \"react\";\nimport {observer} from \"mobx-react-lite\";\nimport {Context} from \"../index\";\nimport {Messages as MessagesList} from \"../components/\";\n\nconst Messages:React.FC = () => {\n    const {store} = React.useContext(Context);\n    const messagesRef = React.useRef(null);\n\n    React.useEffect(() => {\n        if (messagesRef !== null) {\n            messagesRef.current.scrollTo(0, 999999);\n        }\n    });\n\n    if (store.getCurrentDialog().messages && store.getViewedDialogId() !== null) {\n        return (<MessagesList messages={store.getCurrentDialog().messages} />);\n    } else {\n        return (<MessagesList />);\n    }\n};\n\nexport default observer(Messages);"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,QAAQ,QAAO,iBAAiB;AACxC,SAAQC,OAAO,QAAO,UAAU;AAChC,SAAQC,QAAQ,IAAIC,YAAY,QAAO,gBAAgB;AAAC;AAExD,MAAMD,QAAiB,GAAG,MAAM;EAAA;EAC5B,MAAM;IAACE;EAAK,CAAC,GAAGL,KAAK,CAACM,UAAU,CAACJ,OAAO,CAAC;EACzC,MAAMK,WAAW,GAAGP,KAAK,CAACQ,MAAM,CAAC,IAAI,CAAC;EAEtCR,KAAK,CAACS,SAAS,CAAC,MAAM;IAClB,IAAIF,WAAW,KAAK,IAAI,EAAE;MACtBA,WAAW,CAACG,OAAO,CAACC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAC3C;EACJ,CAAC,CAAC;EAEF,IAAIN,KAAK,CAACO,gBAAgB,EAAE,CAACC,QAAQ,IAAIR,KAAK,CAACS,iBAAiB,EAAE,KAAK,IAAI,EAAE;IACzE,oBAAQ,QAAC,YAAY;MAAC,QAAQ,EAAET,KAAK,CAACO,gBAAgB,EAAE,CAACC;IAAS;MAAA;MAAA;MAAA;IAAA,QAAG;EACzE,CAAC,MAAM;IACH,oBAAQ,QAAC,YAAY;MAAA;MAAA;MAAA;IAAA,QAAG;EAC5B;AACJ,CAAC;AAAC,GAfIV,QAAiB;AAAA,KAAjBA,QAAiB;AAiBvB,qBAAeF,QAAQ,CAACE,QAAQ,CAAC;AAAC;AAAA;AAAA"},"metadata":{},"sourceType":"module"}